package com.server.entity;

import java.io.Serializable;
import javax.persistence.*;
import javax.xml.bind.annotation.XmlRootElement;


import java.util.Date;


/**
 * The persistent class for the LoginInfo database table.
 * 
 */
@Entity
@XmlRootElement
@Table(schema="mhp")
public class LoginInfo implements Serializable {
	private static final long serialVersionUID = 1L;

	private String loginIp;

	@Temporal(TemporalType.DATE)
	private Date loginTime;

	@Id
	private String userId;
	

	
	@ManyToOne(cascade={CascadeType.PERSIST,CascadeType.MERGE})
	@JoinColumn(name="userId",insertable=false, updatable=false)
	private User user;

	public LoginInfo() {
	}

	public String getLoginIp() {
		return this.loginIp;
	}

	public void setLoginIp(String loginIp) {
		this.loginIp = loginIp;
	}

	public Date getLoginTime() {
		return this.loginTime;
	}

	public void setLoginTime(Date loginTime) {
		this.loginTime = loginTime;
	}

	public String getUserId() {
		return this.userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

}